#include "invoker.h"
#include <iostream>

Invoker::Invoker()
{
    std::cout << "创建调用者实例" << std::endl;
}

Invoker::~Invoker()
{
    std::cout << "释放调用者实例" << std::endl;
}

void Invoker::SetCommand(Command* cmd)
{
    std::cout << "设置命令" << std::endl;
    this->cmd_ = cmd;
}

void Invoker::Action()
{
    std::cout << "执行命令" << std::endl;
    this->cmd_->Execute();
}